<#include "/${parameters.templateDir}/water/include-css-text.ftl" /><#t>
<#include "/${parameters.templateDir}/water/include-js-text.ftl" /><#t>

<#include "/${parameters.templateDir}/water/layout-header.ftl" />
<#if parameters.expand??>
<${parameters.renderMode!"div"} class="field_package"><#t>
</#if>
<#include "/${parameters.templateDir}/simple/text.ftl" /><#t>
<#if parameters.expand??>
<#if parameters.expand == "datepicker">
<img id="${parameters.id}_token" class="field_token field_token_${parameters.expand}" src="<@s.url value="/struts/water/image/s.gif" encode='false' includeParams='none'/>" onclick="jQuery('#${parameters.id}').focus()"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<#t>
<#else>
<img id="${parameters.id}_token" class="field_token field_token_${parameters.expand}" src="<@s.url value="/struts/water/image/s.gif" encode='false' includeParams='none'/>"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<#t>
</#if>
</${parameters.renderMode!"div"}><#t>
</#if>
<#include "/${parameters.templateDir}/water/layout-footer.ftl" />

<#if parameters.expand??>
<#if parameters.expand == "autocomplete"  && parameters.data??>
<#include "/${parameters.templateDir}/water/include-css-autocomplete.ftl" /><#t>
<#include "/${parameters.templateDir}/water/include-js-jquery-autocomplete.ftl" /><#t>
<#include "/${parameters.templateDir}/water/include-js-jquery-livequery.ftl" /><#t>
<script type="text/javascript"><#t>
jQuery(function(){<#t>
<#if parameters.options?? >
$("#${parameters.id?html}").autocomplete(${parameters.data},{${parameters.options}});<#t>
<#else>
$("#${parameters.id?html}").autocomplete(${parameters.data});<#t>
</#if>
});<#t>
</script><#t>
</#if>
<#if parameters.expand == "datepicker">
<#include "/${parameters.templateDir}/water/include-css-jquery-ui-all.ftl" /><#t>
<#include "/${parameters.templateDir}/water/include-js-jquery-ui-core.ftl" /><#t>
<#include "/${parameters.templateDir}/water/include-js-jquery-ui-datepicker.ftl" /><#t>
<#if !(Request.__jquery_ui_i18n__)??>
<script src="<@s.url value='/struts/water/js/ui/i18n/jquery.ui.datepicker-${locale?replace(\'_\',\'-\')}.js'/>" type="text/javascript"></script><#rt/>
<script type="text/javascript"><#t>
jQuery(function(){<#t>
$.datepicker.setDefaults($.datepicker.regional["${locale?replace('_','-')}"]);<#t>
$.datepicker.setDefaults({showOtherMonths: true});<#t>
});<#t>
</script><#t>
<@s.set name="__jquery_ui_i18n__" value="true" scope="request"/>
</#if>
<script type="text/javascript"><#t>
<#--jQuery(function(){<#t>-->
<#if parameters.options?? >
$("#${parameters.id?html}").datepicker({${parameters.options}});<#t>
<#else>
$("#${parameters.id?html}").datepicker();<#t>
</#if>
<#--});<#t>-->
</script><#t>
</#if>
<#if parameters.expand == "fancybox">
<#include "/${parameters.templateDir}/water/include-js-jquery-easing.ftl" />
<#include "/${parameters.templateDir}/water/include-js-jquery-mousewheel.ftl" />
<#include "/${parameters.templateDir}/water/include-js-jquery-fancybox.ftl" />
<#include "/${parameters.templateDir}/water/include-css-fancybox.ftl" />
<script type="text/javascript"><#t>
<#--$(function($){<#t>-->
<#if parameters.options?? >
<#--$("#${parameters.id?html}_token").fancybox({'transitionIn':'elastic','transitionOut':'elastic','hideOnOverlayClick':false,'titlePosition':'inside','padding':3,${parameters.options}});<#t>-->
$("#${parameters.id?html}_token").click(function(){$.fancybox({'transitionIn':'elastic','transitionOut':'elastic','hideOnOverlayClick':false,'titlePosition':'inside','padding':3,${parameters.options}})});<#t>
<#else>
<#--$("#${parameters.id?html}_token").fancybox({'transitionIn':'elastic','transitionOut':'elastic','hideOnOverlayClick':false,'titlePosition':'inside','padding':3});<#t>-->
$("#${parameters.id?html}_token").click(function(){$.fancybox({'transitionIn':'elastic','transitionOut':'elastic','hideOnOverlayClick':false,'titlePosition':'inside','padding':3})});<#t>
</#if>
<#--});<#t>-->
</script><#t>
</#if>
</#if>
